// import type { ConditionQuery } from '@/apis/model/waf'
import { defineStore } from 'pinia'
import { getCdnNodeWafConditionsApi } from '@/apis/modules/cdn'
// import fieldData from './data'

export const useConfigStore = defineStore(
  'CONFIG_CONSOLE_STORE',
  () => {
    const conditionQuery = ref<any>([])

    function getCondition(params?: any) {
      getCdnNodeWafConditionsApi({ ...params }).then((res) => {
        conditionQuery.value = res.list
        // conditionQuery.value = [...fieldData]
      })
    }
    return { conditionQuery, getCondition }
  },
  {
    persist: true,
  },
)
